class Solution:
    def minNumber(self, nums: List[int]) -> str:
        def judge(x,y):
            a, b = x + y, y + x
            if a > b: return 1
            elif a < b: return -1
            else: return 0
        nums=[str(n) for n in nums]
        n=len(nums)
        for i in range(n):
            index=i
            for j in range(i+1,n):
                if judge(nums[index],nums[j])>=0:
                    index=j
            nums[i],nums[index]=nums[index],nums[i]
        return "".join(nums)
print(maxValue( [3,30,34,5,9]))